﻿<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <title>测试容器</title>
    <link href="../../../DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
    <link href="../../Style/skin/css/style.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/easyUI145/jquery.min.js" type="text/javascript"></script>
    <script src="../../Scripts/easyUI145/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="../../Scripts/QueryString.js" type="text/javascript"></script>
    <script src="../../Scripts/config.js" type="text/javascript"></script>
    <script src="../../Comm/Gener.js" type="text/javascript"></script>
    <script src="../../Scripts/EasyUIUtility.js" type="text/javascript"></script>
    <link href="../../Scripts/bootstrap/css/bootstrap.css" rel="stylesheet" />
    <link href="../../Scripts/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
    <script src="../../Scripts/bootstrap/js/bootstrap.min.js"></script>
    <script src="../../Scripts/bootstrap/BootstrapUIDialog.js"></script>
    <script src="Left.js"></script>
    <script language="javascript" type="text/javascript">

        //关闭页面登录admin
        $(window).on('beforeunload', function () {

            LetAdminerLogin();

        });

        /*// 当前页面失去焦点登录admin
        window.onblur  = function () {
            var adminer = GetQueryString("Adminer"); //管理员.
            var sid = GetQueryString("AdminerSID"); //管理员SID.
            //访问后台，管理员登录.
            var handler = new HttpHandler("BP.WF.HttpHandler.WF_Admin_TestingContainer");
            handler.AddUrlData();
            var data = handler.DoMethodReturnString("Default_LetAdminerLogin");
        }*/
        //获得参数.
        var flowNo = this.GetQueryString("FK_Flow");

        var flow = new Entity("BP.WF.Flow", flowNo);
        document.title = "测试容器:" + flow.Name;

        //var adminer = GetQueryString("Adminer"); //管理员.
        var adminerSID = GetQueryString("SID"); //管理员SID.
        var userNo = GetQueryString("UserNo"); //要登录的用户

        //访问后台，获得一个工作ID.
        var handler = new HttpHandler("BP.WF.HttpHandler.WF_Admin_TestingContainer");
        handler.AddUrlData();
        var workID = handler.DoMethodReturnString("Default_Init");
        if (workID.indexOf('err@') == 0) {
            var url = 'error.htm?err=' + workID;

            confirm("测试容器发起错误，请参考以下信息：<\br>" + workID);
            // window.open(url, '错误信息', 'height=500,width=600,top=200,left=500,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no');
            window.close();
        }

        var urlEnd = "&FK_Flow=" + flowNo + "&WorkID=" + workID + "&UserNo=" + userNo + "&SID=" + adminerSID;

        //负责人：@qfl
        $(function () {
            InitPageUserInfo();
            document.getElementById("J_iframe").src = "../../MyFlow.htm?FK_Flow=" + flowNo + "&WorkID=" + workID;
        });
        // 发送成功后刷新页面进入切换用户页面
        function refreshRight() {
            $("#J_iframe").attr('src', "SelectOneUser.html?1=2" + urlEnd);

        }

        //如果关闭的时候，就让admin登录.
        function LetAdminerLogin() {
            // var adminer = GetQueryString("Adminer"); //管理员.
            var sid = GetQueryString("SID"); //管理员SID.

            //访问后台，获得一个工作ID.
            var handler = new HttpHandler("BP.WF.HttpHandler.WF_Admin_TestingContainer");
            handler.AddUrlData();
            handler.AddPara("SID", sid);
            var data = handler.DoMethodReturnString("Default_LetAdminerLogin");
            window.close();
        }
    </script>
    <style type="text/css">
        .navbar-default {
            background-color: white !important;
        }

        .rightContent {
            box-sizing: border-box;
            float: left;
            box-sizing: border-box;
            padding-left: 200px;
            overflow-y: overlay;
            overflow-x: hidden;
            clear: both;
            color: #717592;
            min-width: 100%;
            min-height: 500px;
        }
        #userInfo caption{background-color:#fff!important;text-align:center;border:none!important;height: 45px;text-indent:0!important;color:#000;border-bottom:solid 1px #ccc!important;}
        .navbar-default table{margin:0!important;border:none!important;}
        .navbar-default table td{padding:5px 15px;border:none!important;}
        #Info ul{border:none!important;padding:10px;box-sizing:border-box;}
    </style>
</head>
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
    <div id="wrapper">
        <!--左侧导航开始-->
        <nav class="navbar-default navbar-static-side" role="navigation" style="background-color:#f5f5f5!important;border-right:solid 1px #ccc;">
            <div class="sidebar-collapse">
                <div id="userInfo" style="box-sizing:border-box;"></div>
                <div style="background-color:#fff!important;text-align:center;padding:10px;border-top:solid 1px #ccc;border-bottom:solid 1px #ccc;color:#000;font-weight:bold;">
                    操作功能
                </div>
                <div class="sidebar-collapse" id="Info">
                </div>
                <div style="background-color:#fff!important;text-align:center;padding:10px;border-top:solid 1px #ccc;border-bottom:solid 1px #ccc;color:#000;font-weight:bold;">
                    基础功能
                </div>
                <div class="sidebar-collapse" id="BaseInfo">
                </div>
            </div>
        </nav>
        <!--左侧导航结束-->
        <!--右侧部分开始-->
        <div id="page-wrapper" class="gray-bg dashbard-1" style="overflow:hidden">
            <div class="row J_mainContent" id="content-main">
                <iframe id="J_iframe" width="100%" height="100%" frameborder="0" seamless></iframe>
            </div>
        </div>
        <!--右侧部分结束-->
    </div>

    <!--<body>
        <div id="wrap">
            <div class="leftMenu" id="leftMenu">
                <div id="userInfo"></div>
                <table style="width:100%;">
                    <caption>操作功能</caption>
                    <tr>
                        <td>
                            <div id="Info"></div>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="rightContent">
                <iframe id="J_iframe" width="100%" height="100%" frameborder="0" seamless></iframe>
            </div>
        </div>
    </body>-->
</body>
</html>
